package com.sun;

import java.sql.SQLOutput;
import java.util.Arrays;

public class RegularSplit {
    public static void main(String[] args) {
//        String[] split = "a b c".split("\\s");
//        String[] split = "a b  c".split("\\s");
//        String[] split = "a b  c".split("\\s");
//        for (int i = 0; i < split.length; i++) {
//            System.out.println(split[i]);
//        }
        System.out.println(Arrays.toString("123a;b;b".split("\\;")));
        System.out.println(Arrays.toString("a b c".split("\\s")));
        System.out.println(Arrays.toString("a b  c".split("\\s")));
        System.out.println(Arrays.toString("a b  c".split("\\s+")));
        System.out.println(Arrays.toString("a, b  ;c".split("\\s")));
        System.out.println(Arrays.toString("a ,b;  c".split("[\\s\\,\\;]+")));


    }
}
